package ctn.event.processor;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import ctn.contant.PlugContant;
import ctn.dao.inteface.CPAInfoDao;
import ctn.event.CTNEventAddPJ;
import ctn.event.CTNEventCheckFun;
import ctn.event.CTNEventDelete;
import ctn.event.CTNEventDropFun;
import ctn.hibernate.po.CpaFun;
@Component(value="dropFunProcessor")
public class DropFunProcessor implements EventProcessor<CTNEventDropFun> {
	@Autowired
	private CPAInfoDao cPAInfoDaoImpl;
	@Override
	public void process(CTNEventDropFun event) {
		CpaFun fun=cPAInfoDaoImpl.getCpaFunByID(event.getFunID());
		fun.setImplUserId(null);
		fun.setStatus(PlugContant.FUN_STATUS_READY);
		cPAInfoDaoImpl.updateCPAFun(fun);
		
	}

}
